package com.ruoyi.carowner.service.impl;

import com.ruoyi.carowner.domain.CarownerWalletAnswer;
import com.ruoyi.carowner.domain.CarownerWalletQuestion;
import com.ruoyi.carowner.mapper.CarownerWalletQuestionMapper;
import com.ruoyi.carowner.service.ICarownerWalletAnswerService;
import com.ruoyi.carowner.service.ICarownerWalletQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 车主常见问题Service业务层处理
 *
 * @author aa
 * @date 2024-08-13
 */
@Service
public class CarownerWalletQuestionServiceImpl implements ICarownerWalletQuestionService {
    @Autowired
    private CarownerWalletQuestionMapper carownerWalletQuestionMapper;
    /**
     * 查询车主常见问题
     *
     * @param id 车主常见问题主键
     * @return 车主常见问题
     */
    @Override
    public CarownerWalletQuestion selectCarownerWalletQuestionById(Integer id) {
        return carownerWalletQuestionMapper.selectCarownerWalletQuestionById(id);
    }

    /**
     * 查询车主常见问题列表
     *
     * @param carownerWalletQuestion 车主常见问题
     * @return 车主常见问题
     */
    @Override
    public List<CarownerWalletQuestion> selectCarownerWalletQuestionList(CarownerWalletQuestion carownerWalletQuestion) {
        return carownerWalletQuestionMapper.selectCarownerWalletQuestionList(carownerWalletQuestion);
    }

    /**
     * 新增车主常见问题
     *
     * @param carownerWalletQuestion 车主常见问题
     * @return 结果
     */
    @Override
    public int insertCarownerWalletQuestion(CarownerWalletQuestion carownerWalletQuestion) {
        return carownerWalletQuestionMapper.insertCarownerWalletQuestion(carownerWalletQuestion);
    }

    /**
     * 修改车主常见问题
     *
     * @param carownerWalletQuestion 车主常见问题
     * @return 结果
     */
    @Override
    public int updateCarownerWalletQuestion(CarownerWalletQuestion carownerWalletQuestion) {
        return carownerWalletQuestionMapper.updateCarownerWalletQuestion(carownerWalletQuestion);
    }

    /**
     * 批量删除车主常见问题
     *
     * @param ids 需要删除的车主常见问题主键
     * @return 结果
     */
    @Override
    public int deleteCarownerWalletQuestionByIds(Integer[] ids) {
        return carownerWalletQuestionMapper.deleteCarownerWalletQuestionByIds(ids);
    }

    /**
     * 删除车主常见问题信息
     *
     * @param id 车主常见问题主键
     * @return 结果
     */
    @Override
    public int deleteCarownerWalletQuestionById(Integer id) {
        return carownerWalletQuestionMapper.deleteCarownerWalletQuestionById(id);
    }
}
